From a7da7a4ecb25ebcf3fe7fdd9fbda4bd6bd8e04d1 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Thu, 27 Oct 2005 17:27:04 +0100 Subject: [PATCH] The attached patch fixes 2 issues with the scripts written for the Xen access control module and makes the tools more self-explanatory. Signed-off-by: Stefan Berger --- tools/security/getlabel.sh | 27 +++++++++++--------- tools/security/setlabel.sh | 40 ++++++++++++++++------------- tools/security/updategrub.sh | 49 ++++++++++++++++++++++++++++-------- 3 files changed, 76 insertions(+), 40 deletions(-) diff --git a/tools/security/getlabel.sh b/tools/security/getlabel.sh index ee1fcba199..40c5c195d5 100644 --- a/tools/security/getlabel.sh +++ b/tools/security/getlabel.sh @@ -36,18 +36,21 @@ source labelfuncs.sh usage () { - echo "Usage: $0 -sid [] or" - echo " $0 -dom [] " - echo "" - echo "policy name : the name of the policy, i.e. 'chwall'" - echo " If the policy name is omitted, the grub.conf" - echo " entry of the running system is tried to be read" - echo " and the policy name determined from there." - echo "ssidref : an ssidref in hex or decimal format, i.e., '0x00010002'" - echo " or '65538'" - echo "domid : id of the domain, i.e., '1'; Use numbers from the 2nd" - echo " column shown when invoking 'xm list'" - echo "" +echo "Use this tool to display the label of a domain or the label that is +corresponding to an ssidref given the name of the running policy. + +Usage: $0 -sid [] or + $0 -dom [] + +policy name : the name of the policy, i.e. 'chwall' + If the policy name is omitted, the grub.conf + entry of the running system is tried to be read + and the policy name determined from there. +ssidref : an ssidref in hex or decimal format, i.e., '0x00010002' + or '65538' +domid : id of the domain, i.e., '1'; Use numbers from the 2nd + column shown when invoking 'xm list' +" } diff --git a/tools/security/setlabel.sh b/tools/security/setlabel.sh index 9e0ec34482..fcc08fc4aa 100644 --- a/tools/security/setlabel.sh +++ b/tools/security/setlabel.sh @@ -39,21 +39,27 @@ source labelfuncs.sh usage () { - echo "Usage: $0 [Option]